/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.srcptit.trainning.thompv.btvn1;
import java.util.Scanner;
/**
 *
 * @author SONY
 */
public class Bai6Muc1 
{
    static boolean tn(int n)
    {
        int goc=n,dao=0;
        while(n>0)
        {
            dao=dao*10+n%10;
            n=n/10;
        }
        if(goc==dao) return true;
        return false;
    }
     public static void main(String[] args)
     {
         for(int i=111111;i<=999999;i++)
             if(tn(i)) System.out.println(i);
     }
}
